<?php
App::uses('tattlrAccount', 'Model');

class tattlrAccountTest extends CakeTestCase {
    var $fixtures = array('app.tattlrAccount');
	public function setUp() {
        parent::setUp();
        $this->tattlrAccount = ClassRegistry::init('tattlrAccount');
    }
	
	public function testUpdateMin(){
		$base = $this->tattlrAccount->find('all', array('conditions' => array('tattlrAccount.accID' => '1')));
		$base = $base['0']['tattlrAccount']['minDuaration'];
		$this->assertTrue($this->tattlrAccount->UpdateMin('500','1'));
		$test = $this->tattlrAccount->find('all', array('conditions' => array('tattlrAccount.accID' => '1')));
		$test = $test['0']['tattlrAccount']['minDuaration'];
		$this->assertEquals('500',$test);
		$this->assertTrue($this->tattlrAccount->UpdateMin($base,'1'));
	}
}
?>